<?php
session_start();
if ($_SESSION['Status'] != '1') {
    header('Location: signup.php');
}
$id = $_SESSION['name'];
$acYrName = $_POST['acYrName'];
$startDate = $_POST['startDate'];
$endDate = $_POST['endDate'];
include 'dbconnection.php';
$query = "Insert INTO acedamic_year (s_date,e_date,Users_email,ayear_name)VALUES ('$startDate','$endDate','$id','$acYrName')";
if (!$result = mysql_query($query)) {
    die("<div id='inner_main'><div class='alert alert-error'>
    <button type='button' class='close' data-dismiss='alert'>&times;
    </button>
    <h4>Insert Error!</h4>
    Could not execute query<br/>" . mysql_error() . "
    </div></div >");
}
include 'dbconnectionclose.php';


/*
 * To change this template, choose Tools | Templates
 * Array
  (
  [acYrName] => 123
  [startDate] => 123
  [endDate] => 123
  )

 * and open the template in the editor.
 */
?>
<div id='inner_main'><div class='alert alert-success'>
        <button type='button' class='close' data-dismiss='alert'>&times;
        </button>
        <h4>Successful!</h4>
        Transaction Completed Successfully.
    </div></div >